package com.wjc.train.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wjc.train.common.entity.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * <p>
 * 车站表
 * </p>
 *
 * @author Guessed
 * @since 2023-08-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("train_station")
public class TrainStation extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 车次编号
     */
    private String trainCode;

    /**
     * 站序
     */
    @TableField(value = "`index`")
    private Integer index;

    /**
     * 站名
     */
    private String name;

    /**
     * 站名拼音
     */
    private String namePinyin;

    /**
     * 进站时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(pattern = "HH:mm:ss",locale = "zh",timezone = "GMT+8")
    private Date inTime;

    /**
     * 出站时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(pattern = "HH:mm:ss",locale = "zh",timezone = "GMT+8")
    private Date outTime;

    /**
     * 停战时长
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(pattern = "HH:mm:ss",locale = "zh",timezone = "GMT+8")
    private Date stopTime;

    /**
     * 里程(公里)|从上一站到本站的距离
     */
    private BigDecimal km;


}
